package com.nyist.test.service.impl;

import com.nyist.test.dao.UserMapper;
import com.nyist.test.entity.User;
import com.nyist.test.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService implements IUserService {

    @Autowired
    private UserMapper userMapper;

    public int add(User user) {
        return userMapper.add(user.getUserName(), user.getPassword(), user.getPhone());
    }

    public List<User> findList()
    {
        return userMapper.findList();
    }

}
